{include file="common/header" title="用户列表"}
<div class="layui-body">
	<!-- 内容主体区域 -->

	<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
		<legend>列表</legend>
	</fieldset>
	<div style="padding: 30px;">
		<form class="layui-form layui-form-pane" action="">
			<table class="layui-table">
				<colgroup>
					<col>
					<col>
					<col width="150">
				</colgroup>
				<thead>
					<tr>
						<th>表名</th>
						<th>备注</th>
						<th>选择</th>
					</tr>
				</thead>
				<tbody>
					{volist name="$tables" id="item"}
					<tr>
						<td>{$item['TABLE_NAME']}</td>
						<td>{$item['TABLE_COMMENT']}</td>
						<td><a class="layui-btn layui-btn-normal layui-btn-sm tableBtn" data-name="{$item['TABLE_NAME']}" >生成</a> </td>
					</tr>
					{/volist}
				</tbody>
			</table>
		</form>
	</div>
</div>
<script>
	layui.use(['layer', 'form'], function () {
		var layer = layui.layer;
		var $ = layui.jquery;
		var form = layui.form;

		$(document).on('click', '.tableBtn', function() { 
			var name = $(this).data('name')
			layer.open({
				type: 2,
				title: '代码生成器',
				area: ['90%', '99%'],
				content: './build?name='+name
			});
		})
	});
</script>
{include file="common/footer"}